package com.andaily.ccg.infrastructure;

import java.util.prefs.Preferences;

/**
 * @author Shengzhao Li
 */
public abstract class PreferencesUtil {


    private static Preferences preferences = Preferences.userNodeForPackage(PreferencesUtil.class);

    public final static String COMPILER_JAR_PATH = "closure.compile.gui.compiled.jar.path";
    public final static String COMPILE_JS_PATH = "closure.compile.gui.compile.js.path";
    public final static String COMPILED_JS_PATH = "closure.compile.gui.compiled.js.path";

    public static void setCompilerJarPath(String path) {
        preferences.put(COMPILER_JAR_PATH, path);
    }

    public static String getCompilerJarPath() {
        return preferences.get(COMPILER_JAR_PATH, "");
    }

    public static void setCompileJSPath(String path) {
        preferences.put(COMPILE_JS_PATH, path);
    }

    public static String getCompileJSPath() {
        return preferences.get(COMPILE_JS_PATH, "");
    }

    public static void setCompiledJSPath(String path) {
        preferences.put(COMPILED_JS_PATH, path);
    }

    public static String getCompiledJSPath() {
        return preferences.get(COMPILED_JS_PATH, "");
    }
}